package com.example.anno.ioc.life;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.DisposableBean;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.SmartInitializingSingleton;
import org.springframework.stereotype.Component;

/**
 * JSR250 JSR303 JSR330
 */
@Component
public class LifeCycleBean implements InitializingBean, DisposableBean {
    protected final Logger log = LoggerFactory.getLogger(this.getClass().getName());

    @Override
    public void afterPropertiesSet() throws Exception {
        log.info(" -> InitializingBean afterPropertiesSet method");
    }

    @Override
    public void destroy() throws Exception {
        log.info(" -> DisposableBean destroy method");
    }
}
